package com.qiall.datautil;


import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.RandomUtils;

import javax.swing.text.html.StyleSheet;

public class RandomUtil {
    static String chars = "abcdefghigklmnopqrstuvwxyz";
    static String num = "1234567890";

    public static String randomString(int len) {
        return RandomStringUtils.random(len, chars);
    }

    public static String randomNum(int len) {
        return RandomStringUtils.random(len, num);
    }

    public static String getId() {
        return randomString(64);
    }

    public static Integer getRandomInt(Integer max){
        return RandomUtils.nextInt(0,max);
    }

    public static void main(String[] args) {
        System.out.println(getRandomInt(2));
    }
}
